package com.heima.bingfagongjulei;

import java.util.concurrent.CountDownLatch;

public class MyCountDownLatch {
    public static void main(String[] args) {
        CountDownLatch countDownLatch = new CountDownLatch(3);
        Mother01 mo = new Mother01(countDownLatch);
        mo.start();
        Child01 ch1 = new Child01(countDownLatch);
        ch1.setName("张");
        ch1.start();
        Chid02 ch2 = new Chid02(countDownLatch);
        ch2.setName("王");
        ch2.start();
        Child03 ch3 = new Child03(countDownLatch);
        ch3.setName("红");
        ch3.start();
    }
}
